home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / DCLAP 6d / dclap6d / network / ncsasock / s_uio.h < prev    next >
Text File  |  1996-07-05  |  2KB  |  58 lines

  1. /*
  2.  * Copyright (c) 1982, 1986 The Regents of the University of California.
  3.  * All rights reserved.
  4.  *
  5.  * Redistribution is only permitted until one year after the first shipment
  6.  * of 4.4BSD by the Regents.  Otherwise, redistribution and use in source and
  7.  * binary forms are permitted provided that: (1) source distributions retain
  8.  * this entire copyright notice and comment, and (2) distributions including
  9.  * binaries display the following acknowledgement:  This product includes
  10.  * software developed by the University of California, Berkeley and its
  11.  * contributors'' in the documentation or other materials provided with the
  12.  * distribution and in all advertising materials mentioning features or use
  13.  * of this software.  Neither the name of the University nor the names of
  14.  * its contributors may be used to endorse or promote products derived from
  15.  * this software without specific prior written permission.
  16.  * THIS SOFTWARE IS PROVIDED AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
  17.  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
  18.  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  19.  *
  20.  *    @(#)uio.h    7.5 (Berkeley) 6/28/90
  21.  */
  22.  
  23. #ifndef _UIO_
  24. #define    _UIO_
  25.  
  26. struct iovec {
  27.     caddr_t    iov_base;
  28.     int    iov_len;
  29. };
  30.  
  31. enum    uio_rw { UIO_READ, UIO_WRITE };
  32.  
  33. /*
  34.  * Segment flag values.
  35.  */
  36. enum    uio_seg {
  37.     UIO_USERSPACE,        /* from user data space */
  38.     UIO_SYSSPACE,        /* from system space */
  39.     UIO_USERISPACE        /* from user I space */
  40. };
  41.  
  42. struct uio {
  43.     struct    iovec *uio_iov;
  44.     int    uio_iovcnt;
  45.     off_t    uio_offset;
  46.     int    uio_resid;
  47.     enum    uio_seg uio_segflg;
  48.     enum    uio_rw uio_rw;
  49. };
  50.  
  51.  /*
  52.   * Limits
  53.   */
  54. #define UIO_MAXIOV    1024        /* max 1K of iov's */
  55. #define UIO_SMALLIOV    8        /* 8 on stack, else malloc */
  56.  
  57. #endif /* !_UIO_ */
  58.